//
//  CourseHotItemModel.m
//  ShowYork
//
//  Created by hxh on 2020/8/31.
//  Copyright © 2020 hxh. All rights reserved.
//

#import "LessonPageItemModel.h"

@implementation LessonPageItemModel





- (NSNumber *)subResultId{
    if (self.subjectId.intValue == 2 ||
        self.subjectId.intValue == 5 ||
        self.subjectId.intValue == 8) {
        return @1;
    }
    if (self.subjectId.intValue == 3 ||
        self.subjectId.intValue == 6 ||
        self.subjectId.intValue == 9 ) {
        return @2;
    }
    if (self.subjectId.intValue == 4 ||
        self.subjectId.intValue == 7 ||
        self.subjectId.intValue == 10) {
        return @3;
    }
    return @0;
}

- (CGSize)itemSize{
    // 默认左右间距
    CGFloat margin = 16;
    CGFloat itemRate = 190.0/165.0f;
    CGFloat itemW = (kScreenW - margin * 3)/2;
    CGFloat itemH = itemW * itemRate;
    return CGSizeMake(itemW, itemH);
}

@end
